nonlin_types Module



Interfaces

public interface iteration_behavior

  • private function ib_constructor(max_iters) result(rst)

    Initializes the iteration_behavior object. All fields are set such that all counters are zero and all convergence flags are false.

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: max_iters

    The maximum number of iterations the solver is allowed to take. An NL_INVALID_INPUT_ERROR is thrown if this value is less than one.

    Return Value type(iteration_behavior)

    The iteration_behavior object.


Derived Types

type, public ::  convergence_history

A collection of arrays providing solver-related data from each iteration.

Components

Type Visibility Attributes Name Initial
real(kind=real64), public, allocatable, dimension(:) :: log_gradient

Base-10 logarithm of the norm of the gradient for each iteration.

real(kind=real64), public, allocatable, dimension(:) :: log_residual

Base-10 logarithm of the residual norm at each iteration.

real(kind=real64), public, allocatable, dimension(:) :: log_step_change

Base-10 logarithm of the norm of the direction vector for each iteration.

type, public ::  iteration_behavior

Defines a set of parameters that describe the behavior of the iteration process.

Components

Type Visibility Attributes Name Initial
logical, public :: converge_on_chng

True if the solution converged as a result of no appreciable change in solution points between iterations; else, false.

logical, public :: converge_on_fcn

True if the solution converged as a result of a zero-valued function; else, false.

logical, public :: converge_on_zero_diff

True if the solution appears to have settled on a stationary point such that the gradient of the function is zero-valued; else, false.

integer, public :: fcn_count

Specifies the number of function evaluations performed.

integer, public :: gradient_count

Specifies the number of gradient vector evaluations performed.

integer, public :: iter_count

Specifies the number of iterations performed.

integer, public :: jacobian_count

Specifies the number of Jacobian evaluations performed.

Constructor

private function ib_constructor (max_iters)

Initializes the iteration_behavior object. All fields are set such that all counters are zero and all convergence flags are false.

Type-Bound Procedures

procedure, public :: get_convergence_history => ib_get_history
procedure, public :: initialize => ib_init
procedure, public :: log_iteration => ib_log_iteration

type, public ::  value_pair

Defines a pair of numeric values.

Components

Type Visibility Attributes Name Initial
real(kind=real64), public :: x1

Value 1.

real(kind=real64), public :: x2

Value 2.